# -*- coding: utf-8 -*-
# Copyright (c) 2020 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.


"""
config file
if ace js framework add config, when you use the util should adapter the config
"""

key_word = [
    'UNKNOWN',
    'alignItems',
    # ifdef FEATURE_COMPONENT_ANALOG_CLOCK
    # 'analog-clock'
    # endif
    'animationDelay',
    'animationDuration',
    'animationFillMode',
    'animationIterationCount',
    'animationName',
    'animationTimingFunction',
    'arc',
    'backgroundColor',
    'backgroundImage',
    'blockColor',
    'borderBottomColor',
    'borderLeftColor',
    'borderRightColor',
    'borderTopColor',
    'borderColor',
    'borderRadius',
    'borderBottomWidth',
    'borderLeftWidth',
    'borderRightWidth',
    'borderTopWidth',
    'borderWidth',
    'break',
    'center',
    'centerX',
    'centerY',
    'change',
    'checked',
    'checkbox',
    'click',
    'clip',
    'chart',
    # ifdef FEATURE_COMPONENT_ANALOG_CLOCK
    # 'clock-hand',
    # endif
    'color',
    'column',
    'column-reverse',
    'columns',
    'datasets',
    # ifdef FEATURE_COMPONENT_DATE_PICKER
    # 'date',
    # endif
    'direction',
    'display',
    'div',
    'drag',
    'duration',
    'ease-in',
    'ease-in-out',
    'ease-out',
    'ellipsis',
    # ifdef FEATURE_COMPONENT_DATE_PICKER
    # 'end',
    # endif
    'expand',
    'false',
    'fixedsize',
    'flexDirection',
    'flex-end',
    'flex-start',
    'flexWrap',
    'fontSize',
    'fontFamily',
    'forwards',
    'height',
    # ifdef FEATURE_COMPONENT_ANALOG_CLOCK
    # 'hour',
    # endif
    'id',
    'image',
    'image-animator',
    'images',
    'index',
    'input',
    'itemselected',
    'iteration',
    'justifyContent',
    # 'key',
    'labels',
    'larger',
    'left',
    'letterSpacing',
    'lineHeight',
    'list-weak',
    'list',
    'list-item',
    'longpress',
    'loop',
    'margin',
    'marginBottom',
    'marginLeft',
    'marginRight',
    'marginTop',
    'marquee',
    'max',
    'min',
    'mini',
    'name',
    'none',
    'opacity',
    'opations',
    'padding',
    'paddingBottom',
    'paddingLeft',
    'paddingRight',
    'paddingTop',
    'percent',
    'picker-view',
    'ref',
    # ifdef FEATURE_COMPONENT_ANALOG_CLOCK
    # 'pivotX',
    # 'pivotY',
    # endif
    'progress',
    'radio',
    'radius',
    'range',
    'reverse',
    'right',
    'rotate',
    'row',
    'row-reverse',
    'scrollamount',
    'scrollend',
    'scrollstart',
    # ifdef FEATURE_COMPONENT_ANALOG_CLOCK
    # 'sec',
    # endif
    'selected',
    'selectedColor',
    'selectedFontFamily',
    'selectedFontSize',
    'show',
    'slider',
    'space-around',
    'space-between',
    'src',
    'stack',
    'standard',
    'stop',
    # ifdef FEATURE_COMPONENT_DATE_PICKER
    # 'start',
    # endif
    'startAngle',
    'step',
    'strokeWidth',
    'swipe',
    'swiper',
    'switch',
    # ifdef FEATURE_COMPONENT_TABS
    # 'tab-bar',
    # 'tab-content',
    # 'tabs',
    # endif
    'text',
    'textAlign',
    'textOverflow',
    'time',
    'top',
    'total-angle',
    # 'touchcancel',
    # 'touchend',
    # 'touchmove',
    # 'touchstart',
    'translateX',
    'translateY',
    'true',
    # ifdef FEATURE_COMPONENT_ANALOG_CLOCK
    # 'type',
    # endif
    'value',
    'vertical',
    'width',
    'wrap'
]

label_name = [
    'UNKNOWN',
    'LAUNCH',
    'ENGINE_INIT',
    'FWK_INIT',
    'JS_BEGIN',
    'JS_FWK_EVAL',
    'JS_APP_INIT',
    'JS_INIT_STATE',
    'JS_INIT_DATA_GET_DATA',
    'JS_INIT_DATA_PROXY',
    'JS_INIT_DATA_OBSERVE',
    'JS_END',
    'FWK_CODE_LOAD',
    'FWK_CODE_EVAL',
    'APP_CODE_LOAD',
    'APP_CODE_EVAL',
    'PAGE_CODE_LOAD',
    'PAGE_CODE_EVAL',
    'STYLESHEET_INIT',
    'APP_ON_CREATE',
    'APP_ON_DESTROY',
    'ROUTER_REPLACE',
    'PAGE_TRANSFER_DATA',
    'PAGE_ON_INIT',
    'PAGE_ON_READY',
    'PAGE_ON_SHOW',
    'PAGE_ON_DESTROY',
    'RENDER',
    'ADD_TO_ROOT_VIEW',
    'RENDER_CREATE_COMPONENT',
    'RENDER_COMBINE_STYLE',
    'RENDER_BIND_JS_OBJECT',
    'RENDER_PARSE_ATTR',
    'RENDER_PARSE_EVENT',
    'RENDER_APPLY_STYLE',
    'RENDER_PROCESS_CHILDREN',
    'SET_ATTR_PARSE_EXPRESSION',
    'SET_ATTR_STRING_OF',
    'SET_ATTR_PARSE_KEY_ID',
    'SET_ATTR_SET_TO_NATIVE',
    'APPLY_STYLE_ITEM',
    'WATCHER_CALLBACK_FUNC',
    'FOR_WATCHER_CALLBACK_FUNC',
    'WATCHER_CONSTRUCT'
]

profiler_name = {
    'UNKNOWN': 'P_UNKNOWN',
    'LAUNCH': 'P_UNKNOWN',
    'ENGINE_INIT': 'LAUNCH',
    'FWK_INIT': 'LAUNCH',
    'JS_BEGIN': 'P_UNKNOWN',
    'JS_FWK_EVAL': 'PAGE_CODE_EVAL',
    'JS_APP_INIT': 'FWK_CODE_EVAL',
    'JS_INIT_STATE': 'JS_FWK_EVAL',
    'JS_INIT_DATA_GET_DATA': 'JS_INIT_STATE',
    'JS_INIT_DATA_PROXY': 'JS_INIT_STATE',
    'JS_INIT_DATA_OBSERVE': 'JS_INIT_STATE',
    'JS_END': 'P_UNKNOWN',
    'FWK_CODE_LOAD': 'FWK_INIT',
    'FWK_CODE_EVAL': 'FWK_INIT',
    'APP_CODE_LOAD': 'LAUNCH',
    'APP_CODE_EVAL': 'LAUNCH',
    'PAGE_CODE_LOAD': 'ROUTER_REPLACE',
    'PAGE_CODE_EVAL': 'ROUTER_REPLACE',
    'STYLESHEET_INIT': 'JS_FWK_EVAL',
    'APP_ON_CREATE': 'LAUNCH',
    'APP_ON_DESTROY': 'LAUNCH',
    'ROUTER_REPLACE': 'LAUNCH',
    'PAGE_TRANSFER_DATA': 'ROUTER_REPLACE',
    'PAGE_ON_INIT': 'ROUTER_REPLACE',
    'PAGE_ON_READY': 'ROUTER_REPLACE',
    'PAGE_ON_SHOW': 'ROUTER_REPLACE',
    'PAGE_ON_DESTROY': 'P_UNKNOWN',
    'RENDER': 'ROUTER_REPLACE',
    'ADD_TO_ROOT_VIEW': 'LAUNCH',
    'RENDER_CREATE_COMPONENT': 'RENDER',
    'RENDER_COMBINE_STYLE': 'RENDER',
    'RENDER_BIND_JS_OBJECT': 'RENDER',
    'RENDER_PARSE_ATTR': 'RENDER',
    'RENDER_PARSE_EVENT': 'RENDER',
    'RENDER_APPLY_STYLE': 'RENDER',
    'RENDER_PROCESS_CHILDREN': 'RENDER',
    'SET_ATTR_PARSE_EXPRESSION': 'RENDER_PARSE_ATTR',
    'SET_ATTR_STRING_OF': 'RENDER_PARSE_ATTR',
    'SET_ATTR_PARSE_KEY_ID': 'RENDER_PARSE_ATTR',
    'SET_ATTR_SET_TO_NATIVE': 'RENDER_PARSE_ATTR',
    'APPLY_STYLE_ITEM': 'RENDER_APPLY_STYLE',
    'WATCHER_CALLBACK_FUNC': 'P_UNKNOWN',
    'FOR_WATCHER_CALLBACK_FUNC': 'P_UNKNOWN',
    'WATCHER_CONSTRUCT': 'SET_ATTR_PARSE_EXPRESSION'
}
